package cn.hd01.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.hd01.repository.DistributorDetailsRepository;
import cn.hd01.repository.entity.DistributorDetails;
import cn.hd01.service.DistributorDetailsService;

@Service
public class DistributorDetailsServiceImpl extends BaseServiceImpl<DistributorDetails, Integer> implements DistributorDetailsService {

	private DistributorDetailsRepository repository;

	@Autowired
	public DistributorDetailsServiceImpl(DistributorDetailsRepository repository) {
		super(repository);
		this.repository = repository;
	}

	@Override
	public DistributorDetails findByDistributorId(Integer distributorId) {
		return repository.findByDistributorId(distributorId);
	}

	@Override
	public DistributorDetails findByCode(String code) {
		return repository.findByCode(code);
	}

}
